<%@ page import="javabean.Staff" %>
<%@ page import="javabean.Complaint" %>
<%@ page import="java.util.List" %>
<%@ page import="javabean.Customer" %><%--
  Created by IntelliJ IDEA.
  User: 32650
  Date: 2023-05-25
  Time: 2:15
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" pageEncoding="UTF-8" %>
<%@ include file="check.jsp"%>
<%
    Staff loginStaff = (Staff) session.getAttribute("loginStaff");
    List<Customer> customerList = (List<Customer>) request.getAttribute("customerList");
%>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8"/>
    <meta
            name="viewport"
            content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"
    />
    <meta http-equiv="X-UA-Compatible" content="ie=edge"/>
    <link href="css/Bar.css" rel="stylesheet">
    <link href="css/pendingStaff.css" rel="stylesheet">
    <title>移动网上营业厅</title>
</head>
<body>
<div class="header">
    <h2>移动网上营业厅</h2>
</div>
<div class="content">
    <div class="left">
        <ul>
            <li><a href="Staff.jsp">个人信息</a></li>
            <li><a href="pendingComplaint">我的工单</a></li>
            <li><a href="UnassignedComplaint">待处理投诉工单</a></li>
            <li><a href="UnassignedMaintance">待分配维修工单</a></li>
            <li><a href="CustomerManager">客户管理</a></li>
            <li><a href="PackageManager">套餐管理</a></li>
            <li><a href="OrderManager">订单管理</a></li>
            <li><a href="Logout">退出登录</a> </li>
        </ul>
    </div>
    <div class="right">
        <div class="container">
            <h1>客户列表</h1>
            <table>
                <thead>
                <tr>
                    <th>用户号</th>
                    <th>姓名</th>
                    <th>手机号</th>
                    <th>地址</th>
                    <th>余额</th>
                    <th>操作</th>
                </tr>
                </thead>
                <tbody>
                <%
                    for (Customer customer : customerList) {
                %>
                <tr>
                    <form action="deleteCustomer" method="post">
                        <td><%=customer.getCustomerID()%>
                        </td>
                        <td><%=customer.getCustomerName()%>
                        </td>
                        <td><%=customer.getCustomerPhone()%>
                        </td>
                        <td><%=customer.getCustomerAddress()%>
                        </td>
                        <td><%=customer.getCustomerBalance()%>
                        </td>
                        <input type="hidden" name="CustomerID" value="<%=customer.getCustomerID()%>">
                        <td><input type="submit" value="删除"></td>
                    </form>
                </tr>
                <%
                    }
                %>
                </tbody>
            </table>
        </div>
    </div>
</div>
</body>
</html>